import {request} from '../../common/request.js';

export function rank(data){
	return request("/ucenter/person/page", data, 'GET');
}

export function getGallery(partyId) {
	return request('/ucenter/person/picture/party/'+partyId, null, 'GET');
}

export function addGallery(data) {
	return request('/ucenter/person/picture/add', data, 'POST');
}

export function getGifts(params) {
	return request('/ucenter/partygift/page', params, 'GET');
}

export function getPartyInfo(partyId) {
	return request('/ucenter/person/get/'+partyId, null, 'GET');
}


export function addAddressItem(data) {
	return request('/ucenter/contactlist/add', data, 'POST');
}

export function getAddressItems(data) {
	return request('/ucenter/contactlist/list', data, 'GET');
}

export function getAddressItem(contactListId){
	return request('/ucenter/contactlist/get/'+contactListId, null, 'GET')
}

export function updateAddressItem(data) {
	return request('/ucenter/contactlist/update', data, 'POST');
}

export function deleteAddressItem(ids) {
	return request('/ucenter/contactlist/remove', {contactMechIds: ids}, 'DELETE');
}

export function getBlacks(params) {
	return request('/ucenter/personblacklist/blacks', params, 'GET');
}

export function deleteBlackById(id, backId) {
	return request('/ucenter/personblacklist/delete/'+id+"/"+backId, null, 'DELETE');
}

export function addBlacks(data) {
	return request('/ucenter/personblacklist/add', data, 'POST');
}

export function updateUser(data) {
	return request("/ucenter/person/update", data,  "POST");
}


export function updateUserLogin(id, data) {
	return request("/ucenter/userlogin/update/"+id, data,  "PUT");
}

export function addUser(data) {
	return request("/ucenter/userLogin/add", data,  "POST")
}

export function getRegistryCode(data) {
	return request("/ucenter/validate/registry/"+ data, null, "GET")
}


export function validateRegistryCode(data) {
	return request("/ucenter/validateCode/registryCode", data, "GET")
}

export function getForgetPwdCode(data) {
	return request("/ucenter/validate/forgetpwd/"+ data, null, "GET")
}




export function validateForgetCode(data) {
	return request("/ucenter/validateCode/forgetpwd", data, "GET")
}

export function addAccusation(data) {
	return request("/ucenter/accusationinfo/add", data, "POST");
}

export function addComplain(data) {
	return request("/ucenter/complaininfo/add", data, "POST")
}

export function addGift(data) {
	return request("/ucenter/partygift/add", data, "POST");
}

export function addFollow(data) {
	return request("/ucenter/partyrelationship/add",data, "POST")
}

export function getMessageCount(data) {
	return request("/ucenter/partymessage/page", data, "GET")
}

export function buyMessageCount(data) {
	return request("/ucenter/partymessage/add", data, "POST")
}

export function addSign(data) {
	return request("/ucenter/partysignlog/add", data, "POST");
}

